<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta charset="utf-8"/>
    <meta name="description" content="overview &amp; stats"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>

    <title>The Carnival Booking System</title>

    <link rel="stylesheet" href="{:config('STATIC')}/bootstrap-3.3.7/css/bootstrap.min.css"/>

    <script src="{:config('STATIC')}/js/jquery.min.js"></script>
    <script src="{:config('STATIC')}/js/vue.js"></script>
    <script src="{:config('STATIC')}/bootstrap-3.3.7/js/bootstrap.min.js"></script>
    <script src="{:config('STATIC')}/laydate/laydate.js"></script>
    <script src="{:config('STATIC')}/layer/layer.js"></script>

    <style>
    </style>
</head>
<body>
<nav class="navbar navbar-default">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">The Carnival Booking System</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a href="{:url('index/index/index')}">Dashboard </a></li>
                <li><a href="{:url('index/public_controller/check_in')}">check in </a></li>
            </ul>
            <?php if(empty($_SESSION['user_id'])): ?>
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown"><a href="{:url('/index/public_controller/login')}" >Login </a></li>
                <li class="dropdown"><a href="{:url('/index/public_controller/register')}">Register</a></li>
            </ul>
            <?php else: ?>
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?=$_SESSION['user_name'] ?> <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a  href="{:url('/index/public_controller/logout')}">Logout</a></li>
                    </ul>
                </li>
            </ul>
            <?php endif; ?>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>

{__CONTENT__}

<script>
    //updateAlert 提示信息显示条，可以替代系统的 alert ,样式主题和位置由 Messenger.options 定义
    window.new_alert = function(message, type) {
        message = message || '出错了  :(';
        type = type || 'error';
        layer.alert(message);

    };
</script>
</body>
</html>
